package vip.ifmm.lehouse.commodity.service.api.mock;

import com.github.pagehelper.PageInfo;
import vip.ifmm.lehouse.commodity.service.api.CommodityService;
import vip.ifmm.lehouse.common.bo.CommodityBo;
import vip.ifmm.lehouse.common.dto.ServerResponse;
import vip.ifmm.lehouse.common.enums.CommonStatus;
import vip.ifmm.lehouse.common.vo.CommodityVo;

/**
 * 商品服务熔断类
 *
 * @author Fish
 * <p>Email: fishinlove@163.com</p>
 * <p>created by 2019/06/21 22:21:54</p>
 */
public class CommodityServiceMock implements CommodityService {

    @Override
    public ServerResponse<Void> saveCommodity(CommodityBo commodityBo) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<PageInfo<?>> listCommodities(int pageNum, int pageSize) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<PageInfo<?>> listCommoditiesByTypeId(int typeId, int pageNum, int pageSize) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<CommodityVo> getCommodity(int commodityId) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }

    @Override
    public ServerResponse<Void> updateCommodity(CommodityVo commodityVo) {
        return ServerResponse.response(CommonStatus.SERVICE_IS_UNAVAILABLE);
    }
}
